package com.winshare.saleAssistant.dao;

import com.winshare.saleAssistant.domain.entity.MaterialDO;
import com.winshare.saleAssistant.domain.query.MaterialQuery;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@Mapper
public interface MaterialMapper {

    int countMaterial(MaterialDO materialDO);

    int saveMaterial(MaterialDO materialDO);

    int updateMaterial(MaterialDO materialDO);

    int countChildMaterial(MaterialDO materialDO);

    MaterialDO getMaterial(MaterialDO materialDO);

    int deleteMaterial(MaterialDO materialDO);

    int queryMaterialCount(MaterialQuery materialQuery);

    List<MaterialDO> findMaterialByConditions(MaterialQuery materialQuery);

    int countMaterialType(MaterialDO materialDO);
}
